package chapter19.h19_3;

public class DayState implements State {
    private static DayState singleton = new DayState();
    private DayState(){

    }
    public static DayState getInstance(){
        return singleton;
    }
    public void doClock(Context context, int hour){
        if(hour < 9 || hour >= 17){
            context.changeState(NightState.getInstance());
        }else if(hour >= 12 && hour <13){
            context.changeState(NoonState.getInstance());
        }
    }
}
